package framework;

import android.graphics.Canvas;
import android.graphics.drawable.Drawable;

public abstract class ScreenObject {

	protected int mX, mY;
	protected int mWidth, mHeight;
	protected Drawable mImage;
	public static int ImageResolution = 16;
	public ScreenObject(int x , int y, Drawable image)
	{
		mX = x;
		mY = y;
		mImage = image;
	}

	abstract public void draw(Canvas c);

	protected void setImage(Drawable image)
	{
		mImage = image;	
		mWidth = mImage.getIntrinsicWidth();
		mHeight = mImage.getIntrinsicHeight();
		ScreenObject.ImageResolution = mWidth;
	}

	public Drawable getDrawable()
	{
		return mImage;
	}
}
